package com.lwww.infinitechat.authenticationservice.data.user.login;

import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;

@Data
@Accessors(chain = true)
public class LoginRequest {

    @NotEmpty(message = "手机号不能为空")
    @Length(min = 11,max = 11,message = "手机号长度为11")
    private String phone;

    @NotEmpty(message = "密码不能为空")
    @Length(min = 6,max = 16,message = "密码长度为6-16")
    private String password;

    @NotEmpty(message = "验证码不能为空")
    @Length(min = 6,max = 6,message = "验证码长度为6")
    private String code;
}
